package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DingdanMapper;
import com.ruoyi.system.domain.Dingdan;
import com.ruoyi.system.service.IDingdanService;
import com.ruoyi.common.support.Convert;

/**
 * 订单 服务层实现
 * 
 * @author ruoyi
 * @date 2019-07-16
 */
@Service
public class DingdanServiceImpl implements IDingdanService 
{
	@Autowired
	private DingdanMapper dingdanMapper;

	/**
     * 查询订单信息
     * 
     * @param dingdanId 订单ID
     * @return 订单信息
     */
    @Override
	public Dingdan selectDingdanById(Integer dingdanId)
	{
	    return dingdanMapper.selectDingdanById(dingdanId);
	}
	
	/**
     * 查询订单列表
     * 
     * @param dingdan 订单信息
     * @return 订单集合
     */
	@Override
	public List<Dingdan> selectDingdanList(Dingdan dingdan)
	{
	    return dingdanMapper.selectDingdanList(dingdan);
	}
	
    /**
     * 新增订单
     * 
     * @param dingdan 订单信息
     * @return 结果
     */
	@Override
	public int insertDingdan(Dingdan dingdan)
	{
	    return dingdanMapper.insertDingdan(dingdan);
	}
	
	/**
     * 修改订单
     * 
     * @param dingdan 订单信息
     * @return 结果
     */
	@Override
	public int updateDingdan(Dingdan dingdan)
	{
	    return dingdanMapper.updateDingdan(dingdan);
	}

	/**
     * 删除订单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDingdanByIds(String ids)
	{
		return dingdanMapper.deleteDingdanByIds(Convert.toStrArray(ids));
	}
	
}
